import { defineStore } from 'pinia';

/**
 * 路由列表
 * @methods setRoutesList 设置路由数据
 */
export const useRoutesList = defineStore('routesList', {
    state: ()=> ({
        routesList: [],
        currentRouterPath:''
    }),
    actions: {
        async setRoutesList(data) {
            this.routesList = data;
        },
        async setCurrentRouterPath(data) {
            this.currentRouterPath = data;
        },
    },
    getters:{
        getHeaderRoutesList: (state) => state.routesList,
        getCurrentRouterPath: (state) => state.currentRouterPath
    }
});
